//
//  MSRequestQueue.h
//  Musou
//
//  Created by danal on 13-3-18.
//
//

#import <Foundation/Foundation.h>
#import "MSRequestObject.h"

@protocol MSRequestObjectQueueDelegate;

@interface MSRequestObjectQueue : NSObject <MSRequestObjectDelegate>
{
    NSMutableArray *_requestList;
    int _index;
    BOOL _started;
}
@property (assign, nonatomic) id<MSRequestObjectQueueDelegate> delegate;

- (void)addRequestObject:(MSRequestObject *)rqo;

- (void)start;

- (void)cancel;

@end


@protocol MSRequestObjectQueueDelegate <NSObject>
@optional
- (void)onRequestQueueStart:(MSRequestObjectQueue *)queue;
- (void)onRequestQueueEnd:(MSRequestObjectQueue *)queue;
@required
- (void)onRequestQueueFinishOne:(MSRequestObject *)rqo ofQueue:(MSRequestObjectQueue *)queue;
@end